package info.akabana.yui.examples.fx3.emplist.behavior
{
	import info.akabana.yui.examples.fx3.emplist.helper.EmpListHelper;
	import info.akabana.yui.examples.fx3.model.EmpInfoModel;
	
	import mx.collections.ArrayCollection;
	
	import org.seasar.akabana.yui.framework.ns.handler;

	public class EmpListInitializedBehavior
	{
		public var helper:EmpListHelper;
		
		handler function on_viewInitialized():void {
			
			setMockModelData();
		}
		
	
		// mock model data
		private function setMockModelData():void {
			var a:ArrayCollection = new ArrayCollection();
			
			var m:EmpInfoModel = new EmpInfoModel();
			m.empNo = "0001";
			m.name = "Sadao";
			m.mobilePhone = "090-1111-2222";
			m.emailMobile = "sadao@mobile.akabana.info";
			a.addItem(m);
			
			m = new EmpInfoModel();
			m.empNo = "0002";
			m.name = "Tokuyama";
			m.mobilePhone = "090-3333-4444";
			m.emailMobile = "tokuyama@mobile.akabana.info";
			a.addItem(m);
			
			m = new EmpInfoModel();
			m.empNo = "0003";
			m.name = "AKABANA";
			m.mobilePhone = "090-5555-6666";
			m.emailMobile = "akabana@mobile.akabana.info";
			a.addItem(m);
			
			m = new EmpInfoModel();
			m.empNo = "0004";
			m.name = "yui";
			m.mobilePhone = "090-7777-8888";
			m.emailMobile = "yui@mobile.akabana.info";
			a.addItem(m);
			
			helper.setEmpList(a);
		}
	}
}